package com.example.demo.Componet;

import com.example.demo.Service.PointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Flush {
    @Autowired
    private PointService pointService;

    @Scheduled(cron = "* 0/30 * * * ?")
    public void task(){
        pointService.getPoints();
        try {
            pointService.setPoints();
        } catch (Exception e) {

        }
    }
}
